home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / utilidad / comptest.arj / COMPTEST.DOC < prev    next >
Encoding:
Text File  |  1994-08-26  |  69.8 KB  |  1,165 lines

  1.      ======================= COMPTEST 2.59 ============================
  2.  
  3.      Release date: August 26, 1994
  4.  
  5.      COMPTEST is a program that determines the system configuration and
  6.      performance characteristics of PC compatible computers. COMPTEST
  7.      was designed to be fast, so most parameters are determined during
  8.      program start-up and the first page of results will come up almost
  9.      immediately. Even for slow systems like the original IBM PC the
  10.      first page will be displayed within a few seconds. There are at
  11.      most three pages with results displayed sequentially, with some
  12.      tests occurring only when the appropriate page is displayed.
  13.  
  14.      Usage: COMPTEST [file name] [/D] [/H]
  15.  
  16.      [file name]  is an optional parameter specifying a file in which
  17.                   the results displayed by COMPTEST will be saved upon
  18.                   termination of COMPTEST.
  19.  
  20.      /D           is an optional switch enabling additional messages
  21.                   that aid in debugging COMPTEST if the program should
  22.                   crash or fail to correctly determine the system
  23.                   configuration.
  24.  
  25.      /H           is a switch that prints a short help screen for COMPTEST.
  26.  
  27.  
  28.  
  29.      COMPTEST 2.60 is Copyright (c) 1988-1994 by
  30.  
  31.      Norbert Juffa
  32.      460 Navaro Way #201
  33.      San Jose, CA 95134
  34.      USA
  35.  
  36.  
  37.      COMPTEST 2.60 is public domain software and is distributed with full
  38.      assembly language and Turbo Pascal 6.0 source code. You are free to
  39.      incorporate parts of the code into your own programs as long as you
  40.      don't use it in a commercial product. Please do others a favor and
  41.      always distribute the complete COMPTEST package, not only the binary.
  42.  
  43.  
  44.      If you want to notify me of bugs you discovered in COMPTEST or want
  45.      to comment on the program in any way, you can either contact me at the
  46.      address above or on Internet as norbert@iit.com
  47.  
  48.  
  49.      Revision history:
  50.  
  51.      Changes since version 2.59
  52.  
  53. o    Detection of the Intel Pentium processor is now based on checking
  54.      the value returned by the CPUID instruction. This is more reliable
  55.      than the timing sensitive solution used before. Support for the
  56.      CPUID instruction is determined by checking the ID bit in the
  57.      EFLAGS register.
  58.  
  59. o    Detection of the Intel DX4 and the Intel Overdrive processors have
  60.      been added. There are minor differences between these CPUs and the
  61.      Intel 486DX. Unlike the Intel 486DX, these processor support the
  62.      CPUID instruction, as does the Intel Pentium processor. By looking
  63.      at the value returned by the CPUID instruction, Pentium, DX4, and
  64.      OverDrive Processors can be told apart. Thanks to Ralph Phraner
  65.      (rapa@netcom.com) for his help in testing the Intel DX4 detection
  66.      mechanism.
  67.  
  68. o    The cache detection mechanism has been enhanced. On fast processors
  69.      like the Intel Pentium, the times measured are very small. Due to
  70.      the limited resolution of the timer chip used in PCs, the granularity
  71.      of the measurement for very short times is large. Because of the
  72.      tight bounds used previously in the algorithm for detecting the cache
  73.      size, the large granularity would frequently result in wrong values
  74.      for the cache size in fast PCs. The bounds have been relaxed and the
  75.      enhanced routine should be able to reliably detect cache sizes on
  76.      PCs up to a clock frequency of 100 MHz.
  77.  
  78.  
  79.      Changes since version 2.58
  80.  
  81. o    Detection method for Cyrix 486DCL/SLC has been changed back to method
  82.      used in COMPTEST 2.57. The detection method used in version 2.58 that
  83.      was based on checking the value in the destination register of a BSF
  84.      instruction after executing it with a source register containing zero
  85.      seems to work only with very old versions of the Intel 80486. Newer
  86.      versions of the Intel 486DX/SX show exactly the same behavior as the
  87.      486DLC/SLC. Therefore, COMPTEST 2.58 reported most 486SX as 486DLC
  88.      and 486DX as RapidCAD. Thanks to Jian Liu and David Ruggiero for
  89.      reporting this bug.
  90.  
  91. o    Experimental support to detect an Intel Pentium CPU has been added.
  92.      Detection is based on incomplete information, so Pentium detection
  93.      and measurements may not work correctly yet.
  94.  
  95.  
  96.      Changes since version 2.57:
  97.  
  98. o    Detection method for Cyrix 486DLC/SLC has been changed. The new method
  99.      does not rely on timing anymore.
  100.  
  101. o    Timing routine has been enhanced to work more reliable with fast machines.
  102.  
  103. o    Documentation file have been enhanced and updated. Minor cosmetic changes
  104.      to COMPTEST and MEMMAP programs.
  105.  
  106. o    New version of Turbo Pascal 6.0 run time library included.
  107.  
  108.  
  109.      Changes since version 2.56:
  110.  
  111. o    COMPTEST 2.56 was compiled with the wrong library. Therefore, benchmark
  112.      results for the floating-point benchmarks (Whetstone, LLL) differ from
  113.      other versions of the program. Sorry about the mistake!
  114.  
  115. o    A correction was added to the determination of coprocessor clock frequency
  116.      in the case a Cyrix 486DLC CPU is present. With a 486DLC present, the
  117.      block of FSQRTs that determines the coprocessor clock frequency is
  118.      executed faster than with the Intel 386DX as CPU, due to the improved
  119.      communication between CPU and coprocessor. The observed speedup is in
  120.      range between 4.7% and 9.7%. For simplicity, COMPTEST 2.59 uses a simple
  121.      correction that divides the computed frequency by 1.055.
  122.  
  123.  
  124.      Changes since version 2.55:
  125.  
  126. o    COMPTEST 2.55 wouldn't detect a Cyrix EMC87 if it was installed and
  127.      reported it as a Cyrix 83D87 instead. This has been fixed.
  128.  
  129. o    Correct detection of the presence and clock frequency of the Cyrix
  130.      486DLC has been tested. Note that presence of a Cyrix 486DLC may
  131.      lead to a higher clock frequency being displayed for a coprocessor,
  132.      if one is installed. Since the 486DLC has an improved handshaking
  133.      with the coprocessor, the block of FSQRT instructions used to measure
  134.      the coprocessor's clock is executed up to 10% faster and the reported
  135.      clock frequency of the coprocessor goes up accordingly.
  136.  
  137.  
  138.      Changes since version 2.54:
  139.  
  140. o    Enhanced POPAD bug detection by testing POPAD execution using 31
  141.      different initial values in the EAX register. Previously, only one
  142.      value was used, which made correct detection of the bug somewhat
  143.      unreliable.
  144.  
  145. o    Detection of the SuperMath 38700DX and 38700SX coprocessors from
  146.      Chips&Technologies have been added and successfully tested. Detection
  147.      for the Intel RapidCAD, Intel 387DX, and Cyrix 387+ has been changed
  148.      from tests depending on instruction timing to tests that rely on
  149.      certain small incompatibilities between the coprocessors.
  150.  
  151. o    When called with a filename to store the results in, COMPTEST would
  152.      fail to print the final message "COMPTEST terminated - press any key"
  153.      if either there was a error in handling the file indicated or if no
  154.      hard disk results were stored. This has been fixed.
  155.  
  156.      ======================================================================
  157.  
  158.      The following is a detailed explanation of the information provided
  159.      by COMPTEST 2.60 and the known limitations of the program.
  160.  
  161.  
  162. o    General limitations:
  163.      Correct execution of COMPTEST depends on certain hardware resources
  164.      provided by the hardware of PC compatibles. That a machine runs MS-DOS
  165.      is by itself no guarantee that COMPTEST can be run successfully, as
  166.      MS-DOS may run on machines that are not 100% compatible with industry
  167.      standard PCs. Since it directly accesses hardware components,
  168.      COMPTEST should not be run in the DOS-boxes supplied by Windows, OS/2
  169.      or similar programs. Even if it does run, some or all of the information
  170.      it provides may be wrong or misleading. For the same reason, it should
  171.      not be run on a PC emulator, e.g. SoftPC by Insignia, even if simpler
  172.      programs like the Landmark Speed Test run successfully in such an
  173.      environment.
  174.  
  175.  
  176. o    Computer type:
  177.      The specific type of an IBM compatible PC is coded into one or two
  178.      bytes in the last 16 bytes of the first MByte of the address range.
  179.      This memory is occupied by the BIOS ROM. Quiet a few values have
  180.      been defined by IBM for its PC, AT, and PS/2 computers. COMPTEST
  181.      decodes this information according to IBM's definitions and prints
  182.      the result. Ordinary 286, 386, and 486 based PCs with an ISA bus
  183.      are reported as AT compatibles.
  184.  
  185.  
  186. o    CPU Type:
  187.      COMPTEST is able to detect the following CPU types: Intel 8088,
  188.      Intel 8086, NEC V20, NEC V30, Intel 80188, Intel 80186, Intel
  189.      80286, Intel 80386DX, Intel 80386SX, Intel 80486DX, Intel 80486SX,
  190.      Intel RapidCAD, Chips&Technologies 38600DX, Cyrix 486DLC, Cyrix 486SLC,
  191.      Intel Pentium, Intel DX4, Intel Overdrive. Detection of Cyrix
  192.      486S and 486DX processor is not yet supported.
  193.  
  194.      The Intel 80186/80188 are CPUs with integrated peripherals that
  195.      have been used in only a few PCs that were manufactured around
  196.      1982/1983. It has an extended 8086 instruction set. The Intel
  197.      RapidCAD is a replacement for a 80386/80387 combination and is
  198.      basically a 80486DX without the internal cache and with a 386 pinout.
  199.      The Chips&Technologies 38600DX is a pin compatible replacement for
  200.      the 80386DX CPU that offers some performance improvements. The
  201.      Intel 486SX is a 80486 without the FPU (floating point unit).
  202.      The Cyrix 486DLC is a CPU that is software compatible with the
  203.      486SX, but is a replacement for the 80386DX CPU. Similarly, the
  204.      Cyrix 486SLC is for use in 386SX systems.
  205.  
  206.      AMD's Am386DX, Am38DXL, Am386SX, and Am386SXL are 100% compatible
  207.      to the Intel 386DX and Intel 386SX CPUs, respectively, and are
  208.      reported as Intel 386DX and Intel 386SX, respectively, by COMPTEST.
  209.      The Intel 486DX2-50, Intel 486DX2-66, and the Intel Overdrive
  210.      processors are 486DX chips that use a clock-doubler that drives
  211.      the CPU internally at twice the speed of all other system components.
  212.      The 486DX2-50 is a replacement for the 486DX-25, while the 486DX2-66
  213.      replaces the 486DX-33. The Overdrive goes into the 487SX socket
  214.      found in many 486SX systems. These processors are all reported as
  215.      80486 processors by COMPTEST.
  216.  
  217.      To distinguish between the different CPUs and math coprocessors,
  218.      COMPTEST in most cases takes advantage of certain incompatibilities
  219.      between the chips that can be tested without using other system
  220.      resources. Only a few tests involve timing differences in the execution
  221.      of certain instructions. These depend on the correct operation of the
  222.      PC's timer chip.
  223.  
  224.      To separate the 8086, 8088, V20, V30, 80186, and 80188 CPU from
  225.      newer CPUs, the behavior of the instruction sequence PUSH SP,
  226.      POP AX is used. While after the execution of these instructions,
  227.      AX=SP on the newer processors, AX=SP-2 for the 8086..80188.
  228.  
  229.      To distinguish among the CPUs in the first group (8086..80188),
  230.      the following properties of the processors are used. The 80186/
  231.      80188 (like all newer Intel CPUs) mask off shift counts MOD 32
  232.      in shift and rotate instructions so that no more than 31 shift
  233.      steps are performed. The V20, V30, 8088, and 8008 do not mask off
  234.      shift counts and perform up to the 255 shift steps allowed by the
  235.      8-bit counter used. If a register with a non-zero contents is
  236.      shifted left with a shift count of 32, it will be cleared after
  237.      the operation on the 8086/8088 and V20/V30, while nothing will
  238.      happen on the 80186/80188, since 32 MOD 32 = 0, that is, no shifting
  239.      takes place. V20 and V30 (just like the 80186/80188 and newer CPUs
  240.      from Intel) have a PUSHA instruction that saves all general registers
  241.      on the stack. The 8086/8088 don't have this instruction, but the
  242.      execution of the PUSHA opcode acts like a JMP skipping the next
  243.      code byte. COMPTEST uses this code byte to set a flag so that
  244.      the flag is only set on V20/V30 processors. If the flag is not
  245.      set, an 8086/8086 must be present. This is verified by an additional
  246.      test that checks if the highest nibble in the flag register can be set.
  247.      This nibble is always cleared on the 8086/8088 and can not be set.
  248.  
  249.      The 8086, V30, and 80186, which have a 16-bit data bus, can be
  250.      distinguished from the 8088, V20, and 80188, which have an 8-bit data
  251.      bus through the use of self modifying code that works differently due
  252.      to the different length of the instruction prefetch queue, which has
  253.      a length of 4 bytes for the CPUs with 8-bit busses, but a length of
  254.      6 bytes for the CPUs with 16-bit busses. Modifying an instruction
  255.      five bytes ahead in the instruction stream will cause the modified
  256.      instruction to be executed by the 8-bit CPU versions, while the
  257.      original instruction will be executed on the 16-bit CPU versions,
  258.      since it was already in the prefetch queue by the time the instruction
  259.      was modified in memory.
  260.  
  261.      To tell apart the 80286 from the 80386 and 80486, an attempt is made
  262.      to change certain bits in the flag register of the CPU. While they can
  263.      be modified in the 80386 and 80486, the 80286 will not allow that to
  264.      be done. The 80486 has a new bit in its flag register that is not defined
  265.      in the 80386 and is always clear there. By attempting to toggle this
  266.      bit, it can be decided whether a 80386 or 80486 is present. The 486SX
  267.      is a 80486 without the FPU (floating point unit ~ integrated coprocessor),
  268.      so if a 486 CPU has been detected but the test for a coprocessor or
  269.      FPU fails, it can be concluded that a 486SX is present. The 80386SX
  270.      has a 16-bit data bus as compared to the 32-bit data bus of the otherwise
  271.      (almost) identical 80386DX, so 32-bit memory accesses on the 80386SX
  272.      are slower than 16-bit memory accesses since they have to be split into
  273.      two 16-bit accesses. On the 386DX, both 16-bit and 32-bit memory
  274.      accesses have the same speed, if memory operands on addresses divisible
  275.      by four are accessed. By measuring and comparing the speed of 16-bit
  276.      and 32-bit memory accesses, COMPTEST determines if a 386SX is present.
  277.      Intel and AMD both make 386DX and 386SX processors that are functionally
  278.      totally identical. However, AMD makes 386DXs that are rated for 40 MHz
  279.      and 386SXs that are rated for 33 MHz, which Intel doesn't make. So
  280.      COMPTEST could make an educated guess on what manufacturer's CPU is
  281.      used based on the clock frequency it determines. COMPTEST does without
  282.      this guess, though, and reports all AMD 386 CPUs as Intel 386DX or Intel
  283.      386SX.
  284.  
  285.      Chips and Technologies has introduced CPUs that are compatible with
  286.      the 386DX and 386SX, which are called the 83600DX and 83600SX. Also,
  287.      an 83600DX with a small internal cache has been announced called the
  288.      83605DX. While AMD uses Intel's microcode in their 386 CPUs, C&T uses
  289.      its own microcode. Therefore, the CPUs from C&T do not possess a well
  290.      known bug present in the Intel 80386. This so called POPAD bug causes
  291.      the EAX register to be trashed for a certain instruction sequence
  292.      involving the POPAD instruction. COMPTEST checks for this bug to
  293.      distinguish the C&T CPUs from Intel's 386 processors. Since I have
  294.      found that the POPAD bug can not be reliably reproduced on Intel 386SX
  295.      CPUs, COMPTEST reports all 386SX CPUs as Intel 386SX, whether a POPAD
  296.      failure occurs or not. Since C&T will not offer the 38600SX before
  297.      late in 1993, this doesn't make the CPU detection by COMPTEST less
  298.      reliable. COMPTEST will not recognize the 83605DX, but will report
  299.      it as an 83600DX. Since the reproducibility of the POPAD bug depends
  300.      somewhat on the initial value of the EAX register, COMPTEST uses 31
  301.      different values.
  302.  
  303.      The Intel RapidCAD is basically a 486 without the internal cache
  304.      that is an end user replacement for a 80386DX/80387 combination.
  305.      It is 100% software compatible with this combination and can be
  306.      detected by checking the speed of store operations from the FPU
  307.      to memory, which are executed much faster on the RapidCAD than in
  308.      any 386/387 system, regardless of the coprocessor used.
  309.  
  310.      Cyrix now offers the 486DLC and the 486SLC that are designed for
  311.      386/386SX systems. However, they are software compatible with the
  312.      Intel 486SX. Cyrix has implemented a fast array multiplier on these
  313.      chips to speed up integer multiplications, making the MUL instruction
  314.      faster than on any other CPU found in PC compatible computers.
  315.      COMPTEST detects the Cyrix 486DLC/SLC by comparing the speed of the
  316.      MUL and AAM instructions. On the 80486, the execution time for the
  317.      MUL instruction ranges from 13 to 26 clock cycles for a 16 bit
  318.      operand, while the AAM instruction executes in 15 clock cycles. So
  319.      multiplication is never significantly faster than AAM. On the Cyrix
  320.      processors, MUL takes 3 cycles with a 16 bit operand, and AAM takes
  321.      16 cylces. So on these processors MUL is several times faster than
  322.      AAM.
  323.  
  324.      The Intel Pentium, Intel DX4, and Intel Overdrive can be distiguished
  325.      from the Intel 486DX CPU by the fact that they all support the
  326.      CPUID instruction, while this instruction is absent from the Intel
  327.      486DX. Whether a CPU supports the CPUID instruction can be determined
  328.      by trying to toggle the ID bit in the EFLAGS register. This bit does
  329.      not exist in the Intel 486DX, so it can't be toggled. The value
  330.      returned by the CPUID instruction can be examined to determine the
  331.      exact type of the CPU.
  332.  
  333.  
  334.  
  335. o    Clock frequency:
  336.      Measuring the clock frequency of the CPU is based on repeated execution
  337.      of the AAM (ASCII adjust after multiply) instruction. This instruction
  338.      takes more than 10 clock cycles to execute on all CPUs that are supported,
  339.      so there is enough time for the CPU to always keep its prefetch queue
  340.      filled, resulting in very stable timings since there is no additional
  341.      penalty for filling up the prefetch queue. Also the AAM instruction has
  342.      the advantage to execute in a fixed number of clock cycles, as opposed
  343.      to some instructions like DIV that take even longer to execute than AAM,
  344.      but whose timing depends on the input arguments. To report the clock
  345.      frequency accurately, it is absolutely important to use the correct
  346.      execution time for the AAM instruction in COMPTEST. Note that the AAM
  347.      execution time stated in the Intel manual for the 8088/8086 is not
  348.      correct. Depending on the accuracy of the oscillator that drives the
  349.      PCs timer, the reported CPU clock frequency should be accurate to within
  350.      +/- 2%. Note that for CPUs that use internal clock doubler circuits
  351.      (e.g. Intel 486DX2-50), the clock frequency displayed by COMPTEST is
  352.      the frequency at which the CPU runs internally (50 MHz in the example
  353.      cited).
  354.  
  355.  
  356. o    Bus width:
  357.      The width of the CPU data bus. This is determined by the type of the
  358.      CPU, so this is actually redundant information.
  359.  
  360.  
  361. o    Cache size:
  362.      COMPTEST is one of very few test programs that correctly determine
  363.      the cache size of first and second level CPU caches. This is very useful
  364.      if you are not sure whether the CPU cache in your computer is enabled
  365.      or functional at all. COMPTEST moves memory blocks of increasing size
  366.      and watches for sharp drops in memory throughput to determine the cache
  367.      sizes. Since the largest blocks tested have a size of 512 KB, COMPTEST
  368.      is limited in that it can *not* correctly detect CPU caches that are
  369.      bigger than 256 KB. The smallest cache size COMPTEST can determine
  370.      is 1 KB, which is the size of the internal cache on the Cyrix 486SLC
  371.      and 486DLC chips. COMPTEST's cache test strategy may be defeated if
  372.      you have defined non-cacheable areas in the first 512 KB of base memory.
  373.      Non-cacheable areas can usually be defined in the extended BIOS setups
  374.      of 386 and 486 based machines and are only necessary if you have a
  375.      write-back cache and have to ensure correct operation of memory mapped
  376.      peripherals (e.g. video memory of graphics card, Weitek coprocessor).
  377.      Usually there is no need to define a non-cacheable area in the first
  378.      512 KB of base memory. COMPTEST's cache detection usually is very
  379.      reliable, only once did it indicate a cache on a system with no CPU
  380.      cache, probably due to the mixture of page/interleave access modes
  381.      used by that system's memory. The technique used by COMPTEST to
  382.      determine cache size basically works as follows: Assume you have a
  383.      machine with a n KB CPU cache. If you read a memory block of n KB or
  384.      less twice, it will be read almost completely from the cache the
  385.      second time it is read (some data may have been thrown out by accesses
  386.      to the code of the test program, as the caches in the Intel 486 and
  387.      comptible CPUs is a unified code and data cache). However, if you
  388.      linearly read a block of 2n KB data twice, the second half of the
  389.      data block will throw out the first half of the data block that is
  390.      already in the cache. On the second pass through, accesses to the
  391.      first half of the block will result in a miss for every cache line
  392.      accessed, as the cache now contains the data from the first n KBytes
  393.      of the block. If the times to read data blocks of 2^i KBytes are
  394.      recorded, one sees a sharp increase in read time as soon as a data
  395.      block larger than the cache size is read. COMPTEST uses block moves
  396.      instead of the block reads in the example, as I have found this to
  397.      be somewhat more reliable.
  398.  
  399.  
  400. o    Maximum RAM throughput (without cache):
  401.      This is a measure of the quality of the main memory system of the
  402.      machine tested. As with all throughput numbers, higher numbers are
  403.      better. Maximum throughput is determined by executing block move
  404.      instructions moving blocks on addresses divisble by four. For processors
  405.      up to and including the 80286, 16 bit transfers are used to move the
  406.      data. For the 80386 and newer processors, 32 bit transfers are used to
  407.      correctly reflect the higher memory throughput that is possible using
  408.      instructions that can handle 32 bit data. By moving memory blocks
  409.      that are bigger than CPU caches that may be present, COMPTEST tries
  410.      to defeat the cache strategy and to measure the true speed of system
  411.      RAM as if no cache(s) were present. However, this technique can back-
  412.      fire so the values given by COMPTEST for RAM throughput without cache
  413.      may be different from those that COMPTEST determines if the cache(s)
  414.      are physically disabled (usually possible through the BIOS setup). The
  415.      value reported by COMPTEST for RAM throughput without cache is really
  416.      the memory throughput with the maximum possible number of cache misses.
  417.      With a decent cache controller, the memory access speed in case of
  418.      a cache miss is the same as if no cache were present at all. However,
  419.      some cache controllers impose an additional overhead on such a memory
  420.      access that may be as large as 40 clock cycles per cache line loaded,
  421.      as opposed to 3-4 clocks for a good cache controller. In these cases,
  422.      COMPTEST reports up to 6 wait states or even more for RAM access
  423.      without cache. Even if COMPTEST does not report the correct value
  424.      for the RAM throughput in these cases, it is still a valuable indicator
  425.      of the quality of the cache/memory subsystem implementation. The
  426.      higher the throughput reported the better does the system perform. On
  427.      systems with no CPU cache, COMPTEST reliably measures the true throughput
  428.      of the system RAM. Based on the measured throughput as compared to
  429.      the maximum throughput for the detected CPU, COMPTEST also computes
  430.      the equivalent number of wait states. This is not an integral number
  431.      due to the fact that the number of wait states is usually not the
  432.      same for every memory access. COMPTEST reports the *average* number
  433.      of wait states needed. With wait states, lower numbers are better.
  434.      Older 80286 based systems going faster than 10 MHz usually have at
  435.      least 0.6-0.7 wait states but on a recently tested 80286 system running
  436.      at 16 MHz, COMPTEST reported 0.1 wait states, which reflects the state
  437.      of the art in memory system design. 80386DX and 80486 based systems
  438.      typically have no less than 1.6 wait states. A brand-new 386SX system
  439.      based on the Am386SX-33 had only 0.3 wait states, though. There are
  440.      machines that use fast SRAM for the 640 KB base memory that doesn't
  441.      force the CPU to insert wait states when accessing this memory. Please
  442.      note that systems using clock doubled chips will often report more
  443.      wait states than systems in which the CPU runs at the same speed as
  444.      the other system components including the memory subsystem. In systems
  445.      with a clock doubled CPU, memory always looks slow to the CPU, as one
  446.      clock cycle on the memory data bus equals two internal CPU clock cycles.
  447.      Since COMPTEST reports waits states measured in CPU clock cycles, one
  448.      will see the wait states reported double when changing from a 486DX-33
  449.      to a 486DX2-66 on the same motherboard. For example, a board for which
  450.      COMPTEST reported 2.6 wait states when run with a 486-33 CPU will have
  451.      5.2 wait states reported after changing to a 486DX2-66 CPU. Reporting
  452.      the wait states measured in internal CPU clock cycles is well justified,
  453.      as the number of wait states tell the user something about the relative
  454.      speed of the memory compared to the speed of the CPU. Clearly, a memory
  455.      subsystem running at 33 MHz is more adequate for a CPU running at 33 MHz
  456.      than for one running at 66 MHz. The RAM throughput measured by COMPTEST
  457.      refers only to base memory (first 640 KB of memory or less).
  458.  
  459.  
  460. o    Cache Throughput:
  461.      This information is only reported if COMPTEST has found a CPU cache
  462.      in the machine. As with memory throughput, higher numbers are better.
  463.      Cache throughput is determined by performing block moves on addresses
  464.      divisible by four within the cache memory using the CPU's MOVS
  465.      instruction with the maximum data width available. If two levels of
  466.      cache are present in the system (e.g. a 80486 system with an external
  467.      cache of 256 KB and the 8 KB of internal cache in the 80486), the
  468.      throughput for both is reported. You will see a performance drop
  469.      going down the memory hierarchy. First level caches usually run with
  470.      no wait states, that is with the full speed supported by the CPU.
  471.      The second level cache has less throughput than the first level cache,
  472.      but is several times larger. The system memory is even slower than
  473.      the second level cache but much bigger. The cache throughput rates
  474.      reported by COMPTEST usually are accurate indicators of the cache
  475.      performance. Write-back caches may have higher throughput rates
  476.      reported than write-through caches, as the block move performs reads
  477.      and writes. However, write-back caches also show higher performance
  478.      when used with real applications, so the higher performance indicated
  479.      by COMPTEST is probably justified.
  480.  
  481.  
  482. o    System memory:
  483.      System memory here refers to the base memory within the first megabyte
  484.      of the address space and below the start of a graphics adapter's
  485.      display memory. COMPTEST searches for RAM in small steps from the
  486.      bottom to the top of the address space until it reaches a graphics
  487.      adapter or no more contiguous RAM is found. Note that this value
  488.      can be larger than the usual 640 KB. For example, on systems that
  489.      have only a CGA, system memory could be expanded up to address B8000h
  490.      for a total of 736 KBytes of system memory. Similarly, system memory
  491.      could be expanded to 704 KBytes on a system using a monochrome
  492.      Hercules card. There are special memory cards that allow such extensions.
  493.      Also, utilities such as the VIDRAM program included with Quarterdeck's
  494.      QEMM memory manager can expand the base memory by either using part
  495.      of a VGA's or EGA's display memory as system memory or mapping
  496.      extended memory into this range, and disabling part of the EGA/VGA's
  497.      capabilities to make basically a CGA out of them.
  498.  
  499.  
  500. o    Memory available to DOS:
  501.      This is the amount of system memory (base memory) that the BIOS
  502.      reports to DOS. The BIOS determines the amount of system memory
  503.      during a cold boot and stores the result in its data block which
  504.      starts at address 400h. Several utility programs that extend the
  505.      system memory above 640 KB, such as the VIDRAM program that comes
  506.      with Quarterdeck's QEMM memory manager, manipulate this value to
  507.      reflect the greater amount of memory now available to DOS. Note
  508.      that the value reported by COMPTEST does not include DOS memory
  509.      in UMBs created by MS-DOS 5.0 or similar programs. This test is
  510.      a bit out of date and could be updated to support the new features
  511.      of the latest DOS versions.
  512.  
  513.  
  514. o    Memory permanently used by DOS and TSRs:
  515.      As the previous test, this one is outdated in that it doesn't take
  516.      into consideration the state of the art with regard to DOS memory
  517.      management. All memory below the address at which COMPTEST is loaded
  518.      is assumed to be unavailable to DOS. Device drivers and TSRs that are
  519.      loaded high are not included into the amount of memory reported. Use
  520.      the program MEMMAP also included in the COMPTEST archive file to get
  521.      a detailed list of memory blocks allocated to DOS and TSRs.
  522.  
  523.  
  524. o    Extended memory (INT 15h throughput):
  525.      Extended memory is that part of a PC's memory that is above the
  526.      first megabyte of the CPU's address space. It can be available only
  527.      on those computers that have an 80286 or newer CPU. Except for the
  528.      first 64 KB block of extended memory, which is called HMA (high
  529.      memory area), it can only be accessed in the protected mode of
  530.      these processors. COMPTEST reports the amount of extended memory
  531.      as determined by the system BIOS during a cold boot. This value is
  532.      stored in the CMOS RAM of the real time clock of AT type machines.
  533.      On newer PCs, this CMOS has been physically incorporated into the
  534.      chip set that contains most of the discrete logic of older PCs in
  535.      two or three chips. COMPTEST reads the amount of extended memory
  536.      directly from the CMOS RAM. Note that the sum of base memory
  537.      and extended memory may not add up to the total memory installed
  538.      in the machine, as some of this memory may be used to shadow the
  539.      BIOS ROM and/or ROM extensions (e.g. VGA BIOS) and is therefore
  540.      unavailable for other purposes. Shadowing means that the code in
  541.      the ROMs is copied to RAM during a cold boot and that this RAM is
  542.      mapped to the same address as the shadowed ROM. Since ROMs are slow,
  543.      code in the ROMs (e.g. BIOS) executes slowly and can be sped up a
  544.      lot by shadowing. Extended memory can be accessed in several ways.
  545.      One way is to use the services of a XMS (extended memory specification)
  546.      driver such as HIMEM.SYS. This, however, requires such a driver to
  547.      be loaded. There are also functions provided by the BIOS via INT 15h
  548.      to access extended memory. COMPTEST uses these to copy a block of
  549.      memory from extended memory to the base memory below 640 KB and
  550.      determines the transfer rate (throughput) by measuring the time it takes
  551.      to copy the block. Using a memory manager such as QEMM usually causes
  552.      the INT 15h functions to be mapped to the appropriate XMS calls, so
  553.      the INT 15h throughput value may differ significantly depending on
  554.      whether a memory manager is loaded or not. Not all BIOSes use 32-bit
  555.      transfers for block copies from/to extended memory when it is
  556.      possible (that is, on 386 and 486 based machines), so the INT 15h
  557.      throughput from extended memory may be only half of the normal system
  558.      memory throughput. Also, access to extended memory usually requires the
  559.      CPU to be switched to protected mode and back, which causes considerable
  560.      overhead when it is not done via the fast methods provided by most
  561.      386 and 486 chip sets, but uses the traditional method which involves
  562.      using the keyboard controller.
  563.  
  564.  
  565. o    Expanded Memory:
  566.      Expanded Memory, specified in the EMS (expanded memory specification),
  567.      was originally designed to provide 8086 and 8088 based computers, which
  568.      have only a one MByte address space, with up to 32 MBytes of memory.
  569.      The LIM (Lotus, Intel, Microsoft)-EMS is a standardized application
  570.      interface that permits several implementation techniques. Memory cards
  571.      which support expanded memory in hardware use sort of a bank switching
  572.      technique. Up to four blocks of 16 KBytes each can be mapped into a
  573.      contiguous 64 KB region in the address range C8000h-E0000h. This region
  574.      is called the EMS page frame. The memory on such EMS cards can not be
  575.      accessed as fast as the system memory on the motherboard in most
  576.      computers, since the data has to travel over the relatively slow ISA
  577.      bus. On the 386 and 486 based computers mostly used nowadays, expanded
  578.      memory is usually provided by a memory manager like 386MAX, QEMM, or
  579.      EMM386 that manages part of the extended memory (memory above the first
  580.      MByte of the address space) as expanded memory. These programs use the
  581.      MMU (memory management unit) built into these CPUs to map memory blocks
  582.      from the extended memory to the EMS page frame. There are also programs
  583.      that use the hard disk to provide the storage for expanded memory.
  584.  
  585.      COMPTEST tries to detect an EMS driver in the system. If it finds one,
  586.      it will question the driver for the total EMS memory provided by it,
  587.      the start address of the EMS page frame and the EMS version number with
  588.      which the EMS driver complies. The current version of EMS is 4.0, which
  589.      defines additional services over the previous version 3.2. COMPTEST does
  590.      not detect a memory card with hardware support for EMS if the EMS driver
  591.      for the card has not been loaded. COMPTEST determines the throughput from
  592.      EMS memory by reserving a EMS-page, mapping it into the page frame and
  593.      doing a block copy from the mapped-in page.
  594.  
  595.      Note that the total amount of memory available to programs that can
  596.      make use of expanded and extended memory may well be lower than the
  597.      sum of the extended memory and the expanded memory, as some of the
  598.      extended memory physically present in the machine and reported by
  599.      COMPTEST may have been logically converted to EMS memory by an EMS
  600.      driver. For example, the QEMM 6.0 memory manager provides extended
  601.      memory according to XMS and expanded memory via a built-in EMS driver,
  602.      and satisfies memory allocation request from a common pool for both
  603.      types of memory. So for a machine with 8 MBytes of physical memory it
  604.      may report 7 MBytes of EMS and 7 Mbytes of extended memory.
  605.  
  606.  
  607. o    other RAM:
  608.      COMPTEST tries to find additional RAM between the end of the graphics
  609.      card's display memory and the start of the BIOS ROM. This RAM may be
  610.      provided by special memory cards or by some chips sets like NEAT that
  611.      can map memory to this region physically. It can also be provided by
  612.      386 memory managers, that use the processor's MMU (memory management unit)
  613.      to logically map memory to this region. The latest DOS versions (e.g.
  614.      MS-DOS 5.0) can use such memory in the form of UMBs (upper memory
  615.      blocks). COMPTEST may also find RAM that is present on network adapters
  616.      or certain hard disk controllers. In such cases, COMPTEST may report
  617.      numerous very short RAM blocks. If the length of these blocks is below
  618.      one KByte, COMPTEST prints the size as 0 KB. The memory found on network
  619.      adapters and hard disk controllers is of course not available to DOS.
  620.      Rather, these adapters use the RAM for buffers or to hold certain
  621.      variables. COMPTEST does not scan the address space above the display
  622.      memory byte by byte to find RAM. Rather it tests every 256th byte if
  623.      it is in RAM. The byte is tested by writing two different values to
  624.      it and checking if both can be reliably read back.
  625.  
  626.  
  627. o    BIOS-extensions:
  628.      COMPTEST searches for BIOS-extensions such as a VGA-BIOS or hard disk
  629.      BIOS between the end of the graphic adapter's display memory and the
  630.      start of the main BIOS-ROM. COMPTEST checks in steps of 256 bytes if
  631.      the next two bytes read 55h, AAh, which is the common ID with which
  632.      all BIOS extensions start. If the sequence 55h, AAh is found, COMPTEST
  633.      reads the next byte, which stores the length of the BIOS-ROM measured
  634.      in 0.5 KByte blocks, if a BIOS-extension is indeed present. All bytes
  635.      in the memory region specified by the length byte are summed up. If
  636.      the 8 lowest bits of the sum are found to be all zero, a valid BIOS
  637.      extension has been found. COMPTEST then tries to determine if the BIOS
  638.      extension found is a hard disk BIOS or an EGA/VGA BIOS and displays
  639.      that additional information where applicable. Note that the same block
  640.      of memory can be displayed as both, a BIOS extension and extra RAM.
  641.      This usually indicates that BIOS shadowing is being used and that
  642.      the shadowed BIOS has not been write protected.
  643.  
  644.  
  645. o    parallel ports:
  646.      COMPTEST prints the number of parallel ports as reported in the
  647.      BIOS's equipment byte.
  648.  
  649.  
  650. o    serial ports:
  651.      PCs are commonly prepared to manage up to four serial ports in the
  652.      system. The BIOS checks for serial ports installed during a cold
  653.      boot and stores the number of serial ports found in the BIOS' data
  654.      area (starting at address 400h). It also determines the start address
  655.      for the block of IO-ports each serial port occupies. COMPTEST evaluates
  656.      this information. It also tests for serial ports (UARTs = universal
  657.      asynchronous receiver transmitter) itself, searching the four
  658.      standardized IO starting addresses used in PCs (3F8h, 2F8h, 3E8h, 2E8h).
  659.      First it tries to establish whether a UART is present at the specified
  660.      address by trying to switch on the loop back feature of the UART and
  661.      then transferring a byte through the loop. If this test passes, COMPTEST
  662.      assumes that a UART is present, since it is highly unlikely that any
  663.      other device would correspond to the same sequence of instructions in
  664.      the same manner. COMPTEST then tries to find out whether the UART chip
  665.      used is a 8250, 16450, 16550, or 16550A. The 8250 is the UART chip used
  666.      in PC compatibles. The 16450 is the successor to the 8250 chip. It
  667.      supports transfers at higher baud rates than the 8250. It also features
  668.      a scratch register that the 8250 does not have. By trying to store
  669.      values in the scratch register and read them back, COMPTEST determines
  670.      whether a 8250 or 16450 is in the system. The 82450 is the same chip
  671.      as the 16450 produced by a different manufacturer and is reported as
  672.      a 16450 by COMPTEST. The 16550 is a 16450 with added send and receive
  673.      FIFO buffers. This makes for more reliable communication and higher
  674.      effective transfer rates in interrupt driven serial communication. The
  675.      original 16550 had a bug that was fixed in the 16550A. The 16550 has
  676.      two status bits that reflect the status of the send/receive FIFOs. On
  677.      the 16550 only one of these bits works correctly, while on the 16550A,
  678.      both of them perform as expected. This is used by COMPTEST to distinguish
  679.      between the two chips.
  680.  
  681.  
  682. o    mathematical coprocessor:
  683.      COMPTEST checks if a 80x87 mathematical coprocessor is present. If
  684.      one is found, it does a detailed check on the type of coprocessor
  685.      installed. It can determine the presence of the Intel 8087, Intel
  686.      80187, Intel 80287, Intel 287XL, Intel 80387, Intel 387DX, Intel
  687.      387SX, Intel RapidCAD, Cyrix 82S87, Cyrix 83S87, Cyrix 83D87, Cyrix
  688.      387+, Cyrix EMC87, IIT 2C87, IIT 3C87, IIT 3C87SX, ULSI 83S87, ULSI
  689.      83C87, C&T 38700DX, C&T 38700SX and coprocessor emulators using INT 7
  690.      for emulation. The Cyrix EMC87 is a 387DX compatible coprocessor that
  691.      also provides a memory mapped mode and goes into the EMC socket (found
  692.      in most 386 based machines) that was originally designed for the Weitek
  693.      coprocessors. Correct detection of most, but not all, of the chips
  694.      mentioned has been tested. COMPTEST also tries to determine the presence
  695.      of a Weitek Abacus 3167 or 4167 coprocessor by checking the BIOS'
  696.      equipment status for a set Weitek bit. However, on most systems, this
  697.      bit is only set if the Weitek coprocessor has been registered in the
  698.      BIOS extended setup by the user, so it is not very reliable. COMPTEST
  699.      does not check for physical presence of a Weitek coprocessor.
  700.  
  701.      COMPTEST takes advantage of the fact that 80x87 coprocessor instructions
  702.      are ignored in systems with no coprocessor. It executes instructions
  703.      that store the default status and control words of a coprocessor to
  704.      memory. If no coprocessor is present, nothing gets stored in these
  705.      memory locations. If the expected values are stored in these locations
  706.      COMPTEST knows that a coprocessor is present.
  707.  
  708.      If a coprocessor has been found, COMPTEST tries to detect into which
  709.      of the following four groups it belongs: emulator via INT 7, 80486,
  710.      8087/80287, all other coprocessors. If the emulation bit in the
  711.      machine status word of a 286 or 386 CPU is set, COMPTEST assumes that
  712.      the 'coprocessor' found is actually an emulator that emulates coprocessor
  713.      instructions via the INT 7 trap. If the CPU was found to be an Intel
  714.      80486, COMPTEST knows that the coprocessor found is the FPU on this
  715.      chip. The Intel 8087 and 80287 were designed before the IEEE-754 Standard
  716.      for Binary Floating-Point Arithmetic was finally accepted in 1985. As
  717.      opposed to all newer coprocessors, they implemented certain features
  718.      no longer supported in the final form of the standard. One of these
  719.      features was that they had two modes for handling infinities. In one
  720.      mode, infinities were signed, in the other, all infinities did not
  721.      carry a sign and were the same. COMPTEST uses this to separate the 8087
  722.      and 80287 from other coprocessors. It generates an infinity by means
  723.      of a division by zero, duplicates that infinity, changes the sign of
  724.      the infinity and then compared the two values. On the 8087 and 80287,
  725.      they will be reported to be identical, while on all other coprocessors,
  726.      the are reported as different due to the different sign. This enables
  727.      COMPTEST to distinguish the Intel 80287 from the 287XL and coprocessors
  728.      compatible with the latter, such as Cyrix 82S87 and IIT 2C87. It also
  729.      makes it possible to find out whether a 386 based system uses the 287
  730.      or a 387 as the coprocessor.
  731.  
  732.      The 287 and 387 compatible coprocessors from different manufacturers
  733.      can be told apart by certain incompatibilities:
  734.      The IIT coprocessors do not support denormal numbers in the coprocessor's
  735.      internal format, while all other coprocessors do. COMPTEST tests for
  736.      the IIT coprocessors by loading an extended precision denormal and
  737.      adding that number to itself. On all coprocessors except the ones
  738.      from IIT, this causes the denormal exception to be raised. Since the
  739.      result is flushed to zero on the IIT coprocessors, the denormal exception
  740.      is not raised.
  741.      The ULSI coprocessors do not support the rounding control feature of
  742.      the other coprocessors. They compute all results in extended precision.
  743.      To test for ULSI coprocessors, COMPTEST sets the precision control
  744.      to 53 bits and then multiplies two numbers whose product can be
  745.      represented exactly in the 64 mantissa bits of the extended precision
  746.      format, but not in 53 mantissa bits. Therefore, the precision exception
  747.      is raised on all coprocessors except the ones from ULSI.
  748.      In the Cyrix coprocessors, several small bugs present in the Intel
  749.      coprocessors have been fixed. One of them deals with the operation
  750.      on NaNs. Intel's requirements state that an instruction that operates
  751.      on two NaNs should return the larger of the two NaNs. However, if both
  752.      NaNs have the same absolute value but different sign, Intel's coprocessors
  753.      erroneously return the negative (and therefore smaller) NaN. The Cyrix
  754.      coprocessors return the correct result in these cases. COMPTEST uses
  755.      the FPATAN instruction to perform the test described. The successor
  756.      to the 83D87 from Cyrix is the 387+. This is a "Europe-only" name, in
  757.      other parts of the world, the new coprocessor is sold under the old
  758.      name 83D87. The 387+ can be told apart from the 83D87 because of its
  759.      extended argument range for the FYL2XP1 instruction. While the range
  760.      for this instruction is restricted to -sqrt(2)/2..sqrt(2)/2 on all
  761.      other 80x87 compatibles, it is unrestricted in the 387+. COMPTEST
  762.      computes FYL2XP1 (1.0) and tests if the correct result (1.0) is returned.
  763.      The Cyrix EMC87 can be told apart from other Cyrix coprocessors since
  764.      the most significant bit of its control word can be written.
  765.      The Intel 80387 exists in two versions. The newer one is called 387DX
  766.      and provides about 20% more performance. One difference between these
  767.      chips is what they get for the exponent when doing an FXTRACT of -1.0.
  768.      While the older 80387 gets -0.0 as the answer, the newer 387DX gets
  769.      +0.0. This difference is used by COMPTEST to decide which Intel 80387
  770.      is in the machine.
  771.      The coprocessors from Chips and Technologies are detected by the result
  772.      they return for F2XM1 (pi). Note that F2XM1 is only defined for arguments
  773.      in the interval -1..1. The C&T 38700 coprocessor returns pi/2 when F2XM1
  774.      is called with an argument of pi. The Cyrix coprocessors return the same
  775.      result, but are never submitted to the test for the C&T coprocessors.
  776.      The Intel RapidCAD behaves like a 386/387 combination. One of the few
  777.      differences is the way in which the value BCD INDEFINITE is stored.
  778.      While the Intel 80387 and 387DX store it as FFFF 8000000000000000, the
  779.      RapidCAD and the Intel 80486 store it as FFFF C000000000000000. This
  780.      difference is used by COMPTEST to detect the RapidCAD chip.
  781.  
  782.      COMPTEST measures the clock speed of the coprocessor by measuring the
  783.      time it takes to execute a block of FSQRT instructions. This instruction
  784.      was picked since it has a very stable execution time that varies
  785.      only minimally and has a sufficiently high execution time. However,
  786.      the execution time of coprocessor instructions in 286 and 386 systems
  787.      may vary by a few clock cycles, depending on the chip set used. Also,
  788.      in some systems, the CPU and the coprocessor run asynchronously,
  789.      causing the execution time of coprocessor instructions to vary even
  790.      more, since in 286 and 386 systems the CPU has to fetch the instructions
  791.      and operands for the coprocessor.
  792.  
  793.  
  794. o    mouse:
  795.      COMPTEST tries to detect the presence of a mouse driver, not if a
  796.      mouse if physically hooked up to the PC. It calls a specific mouse
  797.      driver function that returns the information which mouse button has
  798.      been pressed. This has the advantage that the mouse driver's status
  799.      is not changed.
  800.  
  801.  
  802. o    games adapter:
  803.      COMPTEST tries to determine the presence of a games adapter (used
  804.      to hook up up to two analog joysticks to the PC). This test has two
  805.      stages: In the first stage COMPTEST asks the BIOS if a games adapter
  806.      is present, in the second stage it tries to access the games adapters
  807.      registers. Unfortunately, both methods seem to be highly unreliable,
  808.      as COMPTEST usually reports that no games adapter could be found,
  809.      even if one is installed.
  810.  
  811.  
  812. o    DOS drives:
  813.      COMPTEST determines the number of DOS drives by trying to set the
  814.      default drive to DOS drives 0 to 8, and returns all those drives
  815.      as valid DOS drives that can be used as DOS default drive. Note
  816.      that this limits the number of DOS drives that COMPTEST recognizes
  817.      to a maximum of nine drives. This can easily be expanded by some
  818.      changes to the source code.
  819.  
  820. o    floppy drives:
  821.      COMPTEST reports the number of floppy drives as reported in the BIOS
  822.      equipment flag. In AT compatible systems, the type of each floppy
  823.      drive is taken from the drive information found in the CMOS RAM in
  824.      the real time clock. In modern system, this RAM is now part of the
  825.      system's chip set.
  826.  
  827.  
  828. o    hard disks:
  829.      COMPTEST recognizes up to four hard disks. For each drive, it calls
  830.      the 'drive ready' status function of the BIOS. Every drive that
  831.      returns the 'ready' condition is included into the final tally.
  832.      Some removable hard disks, such as Tandon's data packs, that require
  833.      special drivers to hook into the DOS file system, are not recognized
  834.      as hard disks by COMPTEST.
  835.  
  836.  
  837. o    graphics card:
  838.      COMPTEST reports only one graphics card in the system, even if two
  839.      are installed (e.g. EGA and Hercules). It recognizes MDA and CGA
  840.      (found in the original IBM-PC), EGA (introduced with the IBM-AT),
  841.      MCGA and VGA (introduced with IBM's PS/2), also the monochrome
  842.      Hercules card and IBM's PGA. No attempt is made to distinguish
  843.      between the many different chip sets used in today's VGAs (e.g.
  844.      TVGA, Tseng ET4000, Video 7). COMPTEST will also not recognize the
  845.      Hercules RAMFont and Hercules InColor cards, 8514/A, Tiga cards or
  846.      other accelerated graphics cards. COMPTEST detects most of the
  847.      graphics cards it recognizes by making call's to certain functions
  848.      in their BIOS. For EGA cards, it also reports the amount of memory
  849.      on the adapter as reported by the EGA-BIOS.
  850.  
  851.  
  852. o    Video-RAM wait states:
  853.      The CPU usually can not access the display memory on a graphics card
  854.      at full speed due to a number of reasons. As the CRT controller on the
  855.      graphics adapter has to read out the display memory to generate the
  856.      CRT signals and the DRAM found on most graphics cards does not allow
  857.      simultaneous access from the CPU and the CRT controller, the CPU may
  858.      have to wait until the CRT controller has finished its access to a
  859.      particular part of display memory. Second, data transferred to/from
  860.      a graphics card has to travel over the PCs system bus, which has a
  861.      limited throughput that is much smaller than the memory bandwidth of
  862.      the CPU, thus slowing down the average memory access over the bus. The
  863.      ISA bus found in most PCs is particularly slow, while the MCA and
  864.      EISA busses provide more bandwidth. To overcome this problem, some
  865.      manufacturers have chosen to integrate the graphics adapter on the
  866.      mother board or couple the graphics adapter more closely to the CPU
  867.      using a technique called local bus. Local busses are direct extensions
  868.      of the CPU's busses. They usually run at the full speed of the system
  869.      and provide high bandwidth, but can only drive a limited number of
  870.      cards. A popular form of the local bus concept is the VESA local bus
  871.      (VLB), for which numerous graphics cards are now available. Third,
  872.      for fast machines, the speed of the DRAM chips on many graphics card
  873.      (60-70 ns at best) is to slow to allow zero wait state operation of
  874.      video memory accesses. This is the same problem that affects memory
  875.      accesses to the system RAM in these machines. Use of VRAM eases the
  876.      problem somewhat, so all fast graphics cards now use VRAM. Fourth,
  877.      the bus interface used by the graphic card's chip set may introduce
  878.      additional slow down due to the physical organization of the display
  879.      memory (e.g. remapping word accesses to byte accesses). End users can
  880.      influence the raw video throughput (and thereby the number of wait
  881.      states) by selecting a graphics card with a fast chip set and by
  882.      configuring their system to use as high a bus speed as possible.
  883.      Typical numbers for video-RAM wait states are 1 wait state per MHz
  884.      CPU clock frequency for Hercules cards, ~15 wait states for EGA cards,
  885.      and as low as 7 wait states for fast VGA cards (e.g. those using the
  886.      ET4000 chip set). Note that on 486-DX2 system, the number of wait
  887.      states is usually higher since the whole system runs at half the
  888.      speed of the CPU. To measure wait states for video-RAM accesses,
  889.      COMPTEST stores a block of data to the video adapter and measures
  890.      the time to do that. This time is then compared to the time it would
  891.      take to store this data in zero wait state memory. From these values
  892.      the number of wait states is computed. COMPTEST uses the memory at
  893.      address B0000h for monochrome modes and B8000h for color modes for
  894.      this test. On some graphics cards, the memory access at these addresses
  895.      may have a higher number of wait states than in other parts of the
  896.      screen memory (e.g. the memory at A0000h used by high resolution
  897.      graphics modes of EGA/VGA cards). There is also a PD program
  898.      called VIDSPEED that uses a technique similar to COMPTEST's to
  899.      report video-RAM throughput and vertical and horizontal retrace
  900.      frequencies. Note that for graphics cards with accelerator chips,
  901.      the speed with which the CPU can access the RAM on the graphics card
  902.      is not a good indicator of the Windows, OS/2, or X-Windows performance,
  903.      as many operations on the cards are performed on the card itself.
  904.  
  905.  
  906. o    Speed of video output via BIOS:
  907.      The speed is given in characters output per second as measured for
  908.      function #9 of the video BIOS (write character with attribute). Note
  909.      that there are other video-BIOS functions that write characters
  910.      to the screen, that may be faster or slower than the function to
  911.      be chosen for COMPTEST. For these reasons, it is hard to compare
  912.      the output speed determined by COMPTEST with other system diagnostic
  913.      programs such as DiagSoft's PowerMeter. As this test heavily exercises
  914.      code in the video-BIOS, there may be huge performance differences
  915.      between a shadowed and a non-shadowed BIOS. BIOS shadowing means
  916.      that the BIOS code is copied from slow ROMs to fast RAM for faster
  917.      execution at system start up. This is an option in most 286/386/486
  918.      based systems that operate at more than 10 MHz. BIOS throughput drops
  919.      due to the use of the 386 memory managers, since these programs
  920.      intercept all interrupts and therefore introduce a considerable
  921.      overhead into the execution of BIOS interrupts. There may also be
  922.      TSRs that hook the video BIOS interrupt and cause BIOS throughput to
  923.      drop even further. The typical BIOS throughput in fast 386 and 486
  924.      systems usually exceeds 100,000 characters per second. Due to the
  925.      trend to GUIs (graphical user interfaces), the output speed of the
  926.      BIOS has lost its earlier importance. Most programs do not even
  927.      use the BIOS for character based output, but rather write to the
  928.      screen directly. Note that scrolling may reduce the output speed
  929.      significantly and is not included in the BIOS throughput test by
  930.      COMPTEST.
  931.  
  932.  
  933. o    Speed of video output via DOS:
  934.      The speed is given in characters output per second as measured for
  935.      the DOS functions #9 (print string). Note that the DOS file functions
  936.      can also be used to print to the screen and that the output speed
  937.      for these function may differ from the output speed reported. Also,
  938.      the output speed may depend on the string length of the string to
  939.      be printed due to varying amount of overhead while calling DOS. Since
  940.      an ANSI driver usually causes a much slower DOS video output due to
  941.      the need of the driver to check the output stream for interpretable
  942.      sequences, COMPTEST states if the speed shown refers to the output
  943.      speed with or without an ANSI driver present. To check for an ANSI
  944.      driver, COMPTEST prints an ANSI ESC sequence that causes an ANSI
  945.      driver to report the cursor position by inserting the result string
  946.      into the keyboard buffer. COMPTEST then checks if this information
  947.      has arrived in the keyboard buffer and assumes the presence of an
  948.      ANSI device driver if it finds the information in the keyboard buffer.
  949.      Besides the use of an ANSI or similar terminal driver (e.g. EANSI,
  950.      NANSI), the use of a 386 memory manager such a 386MAX, QEMM, or EMM386
  951.      can slow down DOS video throughput as the use of these programs causes
  952.      a higher overhead in the interrupt calls used in the code that prints
  953.      to the screen.
  954.  
  955.  
  956. o    DOS version:
  957.      Shows the DOS version as reported by a call to the DOSGetVersion
  958.      function of MS-DOS. For version 5.0 or later, this may not be
  959.      the true DOS version, since the DOS version number reported to
  960.      an application can be manipulated using the SETVER utility of DOS.
  961.  
  962.  
  963. o    Standard benchmarks:
  964.      COMPTEST uses three widely known standard benchmarks to provide some
  965.      measurements of system performance. Since results for these benchmarks
  966.      depend not only on the speed of the hardware, but also on the code
  967.      quality of the compiler, only the relative performance to the original
  968.      IBM PC displayed by COMPTEST is really significant. The reference
  969.      numbers used in COMPTEST were determined using my own fast replacement
  970.      for Turbo Pascal 6.0's run-time library (available as TPL60N19.ZIP
  971.      from garbo.uwasa.fi and additional ftp sites). The compiler switch
  972.      settings were the same as those found in the source code of COMPTEST
  973.      2.59. If you use another compiler, e.g. Stony Brook Pascal+, which is
  974.      an optimizing compiler mostly compatible with TP 6.0, or use other
  975.      switch settings, you *must* determine new reference values for the
  976.      IBM PC if the PC relative performance numbers are to be of any use.
  977.  
  978.  
  979. o    Dhrystones:
  980.      The results of running the Dhrystone benchmark, a synthetic benchmark
  981.      that is supposedly representative of integer applications. Note that
  982.      Dhrystone performance depends on the hardware as much as on the
  983.      compiler. Therefore, Dhrystone numbers by other system test programs
  984.      may be higher or lower as those reported by COMPTEST, depending on
  985.      whether or not they were compiled with an optimizing compiler or run
  986.      as a 16-bit or a 32-bit program. There are different versions of
  987.      Dhrystone, the version used here (2.1) is the latest available from
  988.      the author of the benchmark, Reinhold Weicker. The Dhrystone code
  989.      fits well into a rather small cache (8 KB will be sufficient), so
  990.      for systems with CPU caches it tests only CPU performance, *not*
  991.      the performance of the memory system. To make the Dhrystone performance
  992.      as determined by COMPTEST useful, the relative performance as
  993.      compared to the original IBM-PC is given.
  994.  
  995.  
  996. o    Whetstones:
  997.      The results of running the Whetstone benchmark, a synthetic benchmark
  998.      that stresses mainly floating point performance, including trans-
  999.      cendental functions like Sin or Exp. As the Dhrystone numbers, the
  1000.      results of the Whetstone benchmark depend as much on the hardware
  1001.      as on the code quality of the compiler (whether optimizing or not),
  1002.      although the compiler dependency is usually somewhat less than with
  1003.      the Dhrystone benchmark. Therefore, Whetstone numbers as determined
  1004.      by COMPTEST should not be compared to those determined by other programs.
  1005.      To make Whetstone results useful, the performance is also rated in
  1006.      comparison with the original IBM-PC. Note that the test uses software
  1007.      emulation of the coprocessor if the machine tested does not have
  1008.      an 80x87 mathematical coprocessor, and that in this case the performance
  1009.      is compared to the equivalent PC configuration, that is a PC without
  1010.      an 8087. There are two versions of the Whetstone benchmark, an older
  1011.      version derived from the original article published in 1976 and a newer
  1012.      version that includes sanity checks. The latest available version
  1013.      acquired from one of the original authors (Brian Wichmann) is used here.
  1014.  
  1015.  
  1016. o    MFLOPS:
  1017.      This benchmark result tells you how many millions of basic floating
  1018.      point operations (add, subtract, multiply) the tested machine is able
  1019.      to execute per second. This number is determined by running an older
  1020.      version of the Lawrence Livermoore Loops, a set of 14 kernels taken
  1021.      from *real* number crunching programs and computing the average MFLOPS
  1022.      (Millions of FLoating-point OPerations per Second). There is a newer
  1023.      suite of LLL out that uses 24 kernels and provides more detailed
  1024.      diagnostics of the floating point performance. Due to its size, it
  1025.      could not easily be integrated into COMPTEST, so the older (and simpler)
  1026.      version was used. The LLL benchmark uses about 60 KB of RAM, so results
  1027.      may be influenced by the size of the CPU cache, if any is installed.
  1028.      For reference, the MFLOPS are compared to the performance of an IBM-PC
  1029.      with 8087 (if the tested machine also has a coprocessor) or to a plain
  1030.      IBM-PC using the software emulator (if the machine tested does *not*
  1031.      have a coprocessor). As with the other benchmarks, the LLL performance
  1032.      depends not only on the hardware, but also on the compiler used. Highly
  1033.      optimizing compilers that make use of 32-bit instructions where possible
  1034.      would give an MFLOPS rating that is about 50% higher.
  1035.  
  1036.  
  1037. o    Hard disk data:
  1038.      COMPTEST usually is able to test all hard disks in your system, regard-
  1039.      less of whether they use the ST506, IDE, ESDI, or SCSI interface. How-
  1040.      ever, it may fail to detect some special types of hard disks like the
  1041.      removable data packs found on some Tandon computers that use special
  1042.      drivers to hook into the DOS file system.
  1043.  
  1044.  
  1045. o    Hard disk geometry (# cylinders, # read/write heads, sectors per track):
  1046.      These disk parameters are given as reported by the BIOS. The parameters
  1047.      given may not reflect the physical geometry of the disk. For example,
  1048.      if a disks uses the zone bit recording technique, there is no
  1049.      fixed ratio of sectors per track, rather the number of sectors per
  1050.      track is greater in the outer zones and smaller in the inner zones.
  1051.      So the parameters given reflect the logical layout of the disk as
  1052.      seen by the BIOS, which may or may not coincide with the physical
  1053.      layout of the disk.
  1054.  
  1055.  
  1056. o    Hard disk storage capacity:
  1057.      The *formatted* capacity of the disk is given in bytes and MB. Note
  1058.      that a MB contains 1024x1024 = 1,048,576 bytes if computed correctly.
  1059.      Some disk manufacturers (e.g. Quantum) state the storage capacity in
  1060.      MBs consisting of only 1,000,000 bytes. Therefore, the capacity in MB
  1061.      as reported by COMPTEST may be lower than the capacity the manufacturer
  1062.      claims for the disk. Also, the capacity you can use using DOS may be
  1063.      even smaller, since DOS allocates some disk memory to build allocation
  1064.      structures like partition tables or FATs.
  1065.  
  1066.  
  1067. o    Track-to-track seek time:
  1068.      The time it takes to move the read/write heads of your hard disks
  1069.      from one cylinder to an adjacent cylinder. The time reported may
  1070.      be zero when using certain disk cache programs (e.g. HyperDisk),
  1071.      as these suppress unnecessary head movements if no data is read
  1072.      or written in the process (as happens when COMPTEST does this
  1073.      test). Also, COMPTEST may be fooled by the so called translation
  1074.      modes mainly used by certain hard disks using the IDE interface
  1075.      to overcome limitations to the maximum number of cylinders set
  1076.      by the BIOS or to accommodate the fixed sectors/track scheme of
  1077.      PCs to the modern zone bit recording technique. With translation
  1078.      mode enabled, two logical tracks can reside on the same physical
  1079.      track, essentially nullifying the time to move between the logical
  1080.      tracks. COMPTEST moves the read/write heads over all tracks in single
  1081.      track steps and divides the total time by the number of tracks moved.
  1082.      This provides an average time, since movements between adjacent tracks
  1083.      may take different times depending on the absolute location of the
  1084.      tracks.
  1085.  
  1086.  
  1087. o    Average seek time:
  1088.      The time needed on the *average* to position the read/write heads
  1089.      over an arbitrarily selected cylinder on the disk. This time is
  1090.      roughly equal to the time it takes the heads to travel over one
  1091.      third the total numbers of tracks. It can be shown that, if tracks
  1092.      are selected at random from a uniform distribution on [0..MaxTrack]
  1093.      the average difference between any pair of track numbers is equal
  1094.      to one third the total numbers of tracks. Note however, that the
  1095.      assumption of a uniform distribution in track access patterns
  1096.      usually does *not* hold for practical file systems. Also, the
  1097.      average number of tracks traveled by read/write heads varies
  1098.      for the different zones of a disk using zone bit recording or
  1099.      using read/write queuing. For most disks however, the number
  1100.      reported by COMPTEST should be close to the number stated by the
  1101.      disk's manufacturer. When using certain disk cache programs, you
  1102.      will see very small times due to the fact that these programs
  1103.      suppress all unnecessary head movements. Note also that the
  1104.      average access time by definition is not equal to the tine needed
  1105.      on the average to access a specific sector on the disk. For this
  1106.      you have to add at least the rotational latency (the time needed
  1107.      until the read/write head reaches the designated sector on the
  1108.      track after having moved to the correct cylinder). This takes
  1109.      half of the time required for a full revolution of the disk in the
  1110.      average case, that is 8 ms for a disk spinning at 3600 rpm. Newer
  1111.      disks often spin at a higher speed of 4400 rpm or more to reduce
  1112.      rotational latency.
  1113.  
  1114.  
  1115. o    maximum throughput:
  1116.      COMPTEST determines the maximum throughput of a disk similar to the
  1117.      well known CORETEST disk test program by repeatedly reading the
  1118.      same block from disk. It uses the low level functions provided by
  1119.      the BIOS to maximize performance. The amount of data read is the
  1120.      data on one cylinder or 63 KBytes, whichever is smaller. Therefore,
  1121.      no movement of the read/write heads occurs during the read test.
  1122.      The disk's read throughput is determined for the first and the last
  1123.      cylinder on the disk. For hard disks using the zone bit recording
  1124.      technique, the throughput on the outermost cylinder can be about 50%
  1125.      higher than on the innermost cylinder, since more data is recorded
  1126.      on the outer cylinders. Since COMPTEST reports the maximum throughput,
  1127.      it always reports the higher of the two transfer rates it determines.
  1128.      The transfer rate in real applications is usually much lower than
  1129.      the maximum transfer rate reported by COMPTEST. By repeatedly reading
  1130.      the same block from disk, COMPTEST causes the block to be read into
  1131.      the track buffers and on-disk hardware caches present on most modern
  1132.      disks or the cache memory of a caching controller. If the block fits
  1133.      completely into such a cache, the transfer rate measured is actually
  1134.      the transfer rate between the buffer/cache and the system memory. A
  1135.      more realistic transfer rate could be determined by completely reading
  1136.      the data on several adjacent tracks. Since every data item is read
  1137.      only once, a cache will not inflate the transfer rate. The transfer
  1138.      rate determined by this process is called the linear read rate. It
  1139.      is used to measure disk performance in programs such as PCTOOLS 7.1's
  1140.      SI. The linear read rate can be useful to determine disk performance
  1141.      for operations on large files that are contiguous and are read
  1142.      sequentially with only a small amount of head movement. Many applications
  1143.      use random access files, though, and files may not be stored in
  1144.      contiguous form on the disk. In these circumstances, there is a
  1145.      considerable amount of head movement and the seek time and rotational
  1146.      latency cause overhead that further reduces the effective transfer
  1147.      rate available to applications. Note that COMPTEST uses the BIOS to
  1148.      access the disk, while applications make use of an operating system's
  1149.      file system that introduces additional overhead. Also, write access
  1150.      to a disk may be significantly slower than read accesses. Hardware
  1151.      caches on the disk or on the disk controller and software caches
  1152.      like HYPERDISK and SMARTDRV can provide better disk performance
  1153.      by storing frequently used data in cache memory that can be accessed
  1154.      faster than the disk itself. COMPTEST tries to determine the presence
  1155.      of a disk cache by repeatedly reading a small amount of data from
  1156.      different (non-adjacent) tracks. If no cache is present, the head
  1157.      movement to access the different tracks is the reason that the read
  1158.      time can not fall below a certain level due to the physical limits
  1159.      that prevent a reduction in average seek times below about 12 ms.
  1160.      If a cache is present, all data can be hold in the cache memory
  1161.      after the first read access and no additional head movements take
  1162.      place, thereby causing fast execution of COMPTEST's test to determine
  1163.      presence of a disk cache. COMPTEST does not differentiate between
  1164.      hardware and software caches.
  1165.